package com.ruoyi.system.order.service.impl;

import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.ruoyi.system.order.domain.OrderComment;
import com.ruoyi.system.order.domain.OrderCommentDTO;
import com.ruoyi.system.order.domain.OrderCommentQueryDTO;
import com.ruoyi.system.order.mapper.OrderCommentMapper;
import com.ruoyi.system.order.service.OrderCommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author lenovo
* @description 针对表【order_comment(订单评价表)】的数据库操作Service实现
* @createDate 2025-07-01 10:40:59
*/
@Service
public class OrderCommentServiceImpl extends ServiceImpl<OrderCommentMapper, OrderComment>
    implements OrderCommentService {
    @Autowired
    private OrderCommentMapper orderCommentMapper;
    @Override
    public List<OrderCommentDTO> page(OrderCommentQueryDTO q) {
        // 开启 PageHelper 分页
        PageHelper.startPage(q.getPageNum(), q.getPageSize());
        return orderCommentMapper.selectCommentDTOPage(q);
    }

    @Override
    public List<OrderCommentDTO> getOne(Long id) {
        return orderCommentMapper.getOne(id);
    }

}




